<include file="../header" />
<body class="J_scroll_fixed">
<style type="text/css">
    .btn-danger,.btn-info,.btn-success,.btn-warning{
        width: 120px;
        /*height: 18px;*/
        padding: 2px 0px 2px 0px;
        margin: 1px 0px 1px 0px;
    }
</style>
<form class="well form-search" method="post" style="float:left" action="{:U('order/index')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
            状&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;态：{:getEnumSelectWidget($statusEnum, "o#status", $status, 1)}
            &nbsp;用户名称：<input type="text" name="cus#nickname-like" value="{$nickname}" />
            产品名称：<input type="text" name="p#product_name-like" value="{$product_name}" />
            <br>下单开始时间：<input type="text" value="{$begin_time}" class="date J_date" name="o#create_time-egt" />
            下单截止时间：<input type="text" value="{$end_time}" class="date J_date" name="o#create_time-elt" />
            <button class="btn btn-primary" type="submit">搜索</button>
            <a class="btn" href="{:U('order/index')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>订单号</th>
            <th style="min-width: 80px" width="220px">产品信息</th>
            <th style="min-width: 50px" width="180px">客户信息</th>
            <th>备注</th>
            <th style="min-width: 120px">发票信息</th>
            <th>收货人</th>
            <th style="min-width: 80px">医生</th>
            <th style="min-width: 70px">创建时间</th>
            <th style="min-width: 50px">状态</th>
            <th style="min-width: 120px">操作</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="orderList" item="vo">
            <tr>
                <td>{$vo.order_id}<br>{$vo.out_trade_no}</td>
                <!--td>{$vo.product_name}X{$vo.number}件<br>总计：{$vo.price}元</td>
                <td>{$vo.measure_result}</td-->
                <td>
                    <a style="font-weight: bold">{$vo.product_name}</a> x <a style="color: #ed9a63">{$vo.number}</a> 件
                    <br/>
                    <if condition="$vo['status'] gt '0'">
                        规格：【<a>{$vo.size}</a>】，单价：<a style="color: #ed7667">{$vo.price}</a> 元
                        <else/>
                        规格：【<a>{$vo.size}</a>】，团购价：<a style="color: #ed7667">{$vo.group_price}</a> 元
                    </if>
                </td>
                <td>
                    <if condition="$vo['patient_name'] neq ''">
                        患者姓名：<a style="color: #45a1de">{$vo.patient_name}</a>
                        <br/>
                        微信昵称：<a style="color: #1cc385">{$vo.nickname}</a>
                    </if>
                </td>
                <td>{$vo.note}</td>
                <td>{:getEnumString($defaultEnum, $vo['need_invoice'])}&nbsp;<br>{$vo.invoice_name} <br>{$vo.invoice_number}</td>
                <td>{$vo.receive_name}，{$vo.receive_contact}，配送：{$vo.delivery_type}<br>{$vo.receive_address}<br><a style="color: #45a1de">{$vo.express_company} {$vo.delivery_number}</a></td>
                <td>医生：{$vo.doctor_name}<br>医院：{$vo.hospital_name}</td>
                <td>{$vo.create_time}</td>
                <td>
                    <if condition="$vo['status'] eq '-1'">
                        {:getEnumString($statusEnum, $vo['status'])}
                    </if>
                    <if condition="$vo['status'] eq '1'">
                        <a style="color: #ed7667; font-weight: bold">{:getEnumString($statusEnum, $vo['status'])}</a>
                    </if>
                    <if condition="$vo['status'] eq '2'">
                        <a style="color: #3fcca9">{:getEnumString($statusEnum, $vo['status'])}</a>
                    </if>

                </td>
                <td>
                    <if condition="$vo['status'] eq $statusEnum['WAITING_HANDLE']">
                        <a class="btn btn-success" href='{:U("order/endDelivery",array("id"=>$vo["order_id"]))}'>确认出库</a>
                    </if>
                    <if condition="$vo['need_measure'] eq 1">
                        <a class="btn btn-info" href='{:U("order/viewMeasureData",array("id"=>$vo["order_id"]))}'>查看测量信息</a>
                    </if>
                    <if condition="$vo['coupon_code'] neq ''">
                        <br/>
                        <a style="color: #de7d74;font-weight: bold">CP码:{$vo.coupon_code}</a><br/>
                    </if>
                </td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>